Color printing devices and display devices are inherently limited to a range of reproducible colors, sometimes referred to as the color gamut. Because such image reproduction devices are non-ideal, they cannot reproduce every possible color that can be seen by a human. Gamut mapping is often required because the color range that is possible to reproduce with one device is commonly not identical with the color range possible to reproduce with another device. Thus, while displays and printers have a large number of colors that are reproducible by both types of devices, there may be certain combinations of sets of color values that are outside the reproduction capability of one or the other.
Gamut mapping is a well-known problem to be dealt with in color management systems. Input image colors must be mapped to the gamut of the output device in a way that preserves the intent and appearance of the image. An important component of gamut mapping is compression of the luminance dynamic range of the image to that of the output device. Standard approaches apply compression algorithms that are independent of image content (see, for example, K. M. Braun, R. Balasubramanian, R. Eschbach, “Development and Evaluation of Six Gamut-Mapping Algorithms for Pictorial Images”, Proc. IS&T/SID's 7th Color Imaging Conference, pp. 144-148, 1999). These approaches can result in undesirable trade-offs between contrast and detail in the shadows and highlights. Some recent algorithms (see, for example, G. J. Braun, M. D. Fairchild, “General-Purpose Gamut-Mapping Algorithms: Evaluation of Contrast-Preserving Rescaling Functions for Color Gamut Mapping”, Proc. IS&T/SID's 7th Color Imaging Conference, pp. 167-172, 1999) use image content to select a compression function that is applied globally to the image. The same trade-offs still remain, though perhaps to a lesser extent.
When reducing the luminance range of an image to suit that of an output device, there is an inherent trade-off between overall image contrast, and detail in the shadows and/or highlights. A compression function that preserves or enhances contrast will generally sacrifice shadow and highlight detail, and vice versa. The preferred reproduction is a complex trade-off between these two aspects, and one that depends on image content.
Consider for example the function shown in FIG. 1, denoted Lcomp 1. This function can be described as follows. We first define a function f(Lin):f(Lin)=Lmax *(1−(Lin/Lmax)γ)   (1)where γ>1 is a selectable parameter. Function f( ), shown as the partially dashed and partially curved line in FIG. 1, is the inverse-gamma-inverse (IGI) function, and has been used successfully in previous work for luminance compression. Assuming that the reproducible lightness range of the output device is from Lblack to Lmax, a hard-clipping function is then applied:
                                                                        Lcomp1                ⁡                                  (                                      L                                          i                      ⁢                                                                                          ⁢                      n                                                        )                                            =                            ⁢                              f                ⁡                                  (                                      L                                          i                      ⁢                                                                                          ⁢                      n                                                        )                                                                                                      ⁢                                                if                  ⁢                                                                          ⁢                                      f                    ⁡                                          (                                              L                                                  i                          ⁢                                                                                                          ⁢                          n                                                                    )                                                                      ≥                                  L                  black                                                                                                        =                            ⁢                              L                black                                                                                      ⁢                                                if                  ⁢                                                                          ⁢                                      f                    ⁡                                          (                                              L                                                  i                          ⁢                                                                                                          ⁢                          n                                                                    )                                                                      <                                  L                  black                                                                                        (        2        )            Lcomp 1 is shown as the dark solid line in FIG. 1. For reference, the identity function is shown as a dashed straight line. Note that the overall effect of Lcompl is to compress the range [0-Lmax] to the range [Lblack-Lmax]. Also, Lcomp1 will generally preserve or enhance the image contrast. However, all L* variations in the range from 0-Lblack in the input image will be destroyed, since these are all mapped to the same output, Lblack. Thus shadow detail is likely to be diminished or destroyed with Lcomp1.
The function Lcomp2 shown in FIG. 2 is the same as Lcomp1, except for a modification at the dark end to smoothly approach the device black point. This function thus softly compresses the low luminance region, and preserves shadow detail in the lightness range 0-Lblack. However, this is accomplished at the expense of contrast in the dark and midtone regions. The two functions Lcomp1 and Lcomp2 exemplify the classic trade-off between preservation of contrast and shadow detail.
N. Moroney, “Local Color Correction Using Non-Linear Masking”, Proc. IS&T/SID's 8th Color Imaging Conference, pp. 108-111, 2000, proposed a method in which the output of a low-pass filter is used to drive a variable gamma function applied to the input pixels. Shadow pixels are processed with a gamma close to 0.5 (thus lightening these areas), while highlight pixels are processed with a gamma close to 2 (thus darkening these areas). Midtones and areas of high local contrast are passed through with little alteration. Moroney's method applies a transformation that depends only on image characteristics, and not on any particular output device gamut. Also, a variable gamma approach can still significantly alter the image—a characteristic that is potentially dangerous.
U.S. Pat. No. 6,646,762 to T. Balasubramanian, et al. for “Gamut Mapping Preserving Local Luminance Differences” describes a system and method in which spatially varying gamut mapping techniques can significantly reduce the trade-offs and compromises found in pixel wise techniques. What is needed is a luminance compression algorithm for gamut mapping that varies across different parts of the image, spatially adapting the luminance compression function according to the local image characteristics in such a manner as to preserve both shadow detail and overall image contrast.